<template>
  <el-row class="classOption">
    <el-col :span="4" class="baseDescription">{{classItem.cno}}</el-col>
    <el-col :span="4" class="baseDescription">{{classItem.cname}}</el-col>
    <el-col :span="4" class="baseDescription credit">{{classItem.credit}}</el-col>
    <el-col :span="4" class="baseDescription">{{classItem.tname}}</el-col>
    <el-col :span="4" class="baseDescription">{{classItem.position}}</el-col>
    <el-col :span="4" class="baseDescription">
      <el-button class="chooseClass" type="warning" size="small" @click="sendRequest">退选</el-button>
    </el-col>
  </el-row>
</template>

<script lang="ts">
import { computed } from 'vue'
import weeks from '@/assets/PublicStaticValue/components/chooseClass/weeks'
import classStates from '@/assets/PublicStaticValue/components/chooseClass/classStates'
export default {
  name: 'classItem',
  props: {
    classItem: Object
  },
  emits: ['chooseCls'],
  setup (props: any, context: any) {
    function sendRequest () {
      console.log(props.classItem)
      context.emit('chooseCls', props.classItem.cno, props.classItem.tno)
    }
    return {
      classStates, sendRequest
    }
  }
}
</script>

<style lang="scss" scoped>
@import "../../../../assets/Fonts/FontMap/FontMap";
@import "../../../../assets/Fonts/FontMap/FontList.css";
.classOption{
  border-left: 1px solid #DCDFE6;
  border-right: 1px solid #DCDFE6;
  border-bottom: 1px solid #DCDFE6;
  height: 60px;
  width: 100%;
}
.baseDescription{
  height: 100%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chooseClass{
  font-family: $SH_Serif_Regular;
  font-weight: bold;
  font-size: 14px;
}
.credit{
  font-family: $Mi_Lan;
  font-weight: bold;
  color: green;
}
.classState{
  font-weight: bold;
}
</style>
